<template>
  <div id="txioc"></div>
</template>

<script>
import { showAttribute,createPathLayer,clippingModel } from "@/utils/map";
export default {
  name: "HelloWorld",
  data() {
    return {};
  },
  mounted() {
    window.tedp = new this.$trame({
      elem: "txioc",
      width: 1920,
      height: 1080,
      gisType: "hf",
      navtop: 80,
      prop: [435, 435],
      showSub: false,
      isBuiltIn: true,
      compss: [],
      nav: {
        navTop: () => import("@/components/nav/main"),
      },
      module: {
        keyVideo: () => import("@/components/DispatchCommand/keyVideo/main"), //重点视频
        transTrend: () => import("@/components/salesData/transTrend/main"), //销售成交趋势
        salesCategory: () =>
          import("@/components/salesData/salesCategory/main"), //销售bottom
        gqaq: () => import("@/components/envMonitoring/gqaq/main"), //罐区安控
        placepic: () => import("@/components/envMonitoring/placepic/main"), //罐区位置
        monthlyPonsump: () =>
          import("@/components/energyManage/monthlyPonsump/main"), //月度能耗总览

        sysBottomBg: () => import("@/components/module/sysBottomBg/main"), //系统底部渐变
      },

      subClick(index) {},
      gisInit(e) {
        //添加gis模块功能
        window.Viewer = e.Viewer;
        e.Navigate.Stop(); //取消飞行状态
        e.cesium = Cesium;
        e.Navigate.jumpTo({
          //跳转视角 height: 41239.79312476502
          destination: new e.cesium.Cartesian3.fromDegrees(
            120.51849656464545,
            30.59610344027607,
            392.57542646566395
          ),
          orientation: {
            heading: e.cesium.Math.toRadians(0),
            pitch: e.cesium.Math.toRadians(-30),
            roll: 0.0,
          },
        });
        var url1 =
          "http://183.162.245.49:3301/gisserver/c3dserver/tongx0307/tileset.json";
        var tiltModel1 = tedp.webGis.Creator.create3DTilesets(
          "",
          url1,
          {},
          {},
          "0",
          true,
          function (data) {
            clippingModel(true,tiltModel1)
          }
        );

        //对模型进行裁切
        
        showAttribute();
        createPathLayer();

        //tedp.webGis.Viewer.scene.globe.ellipsoid.cartesianToCartographic(tedp.webGis.Viewer.scene.camera.position)
        //tedp.webGis.cesium.Math.toDegrees(tedp.webGis.Viewer.scene.globe.ellipsoid.cartesianToCartographic(tedp.webGis.Viewer.scene.camera.position).longitude)
        //tedp.webGis.cesium.Math.toDegrees(tedp.webGis.Viewer.scene.globe.ellipsoid.cartesianToCartographic(tedp.webGis.Viewer.scene.camera.position).latitude)




        //http://localhost:8080/gisserver/wnsserver/txline_wns?start=506723.33462683%2C682299.75088415&end=508052.44638806%2C681234.16990316&propertyName=Shape&tolerance=10&request=FindRoute&format=json
      },
    });
  },
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
</style>
